#include"TcpServer.hpp"
#include<memory>
void Usage(const std::string as)
{
    std::cerr<<"Usage: " << as<< " port" << std::endl;
}
int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    uint16_t port=std::stoi(argv[1]);
    Enable_Console_Log_Strategy();
    std::unique_ptr<TcpServer> q=std::make_unique<TcpServer>(port);
    q->init();
    q->run();
    return 0;
}